import java.util.Scanner;
public class question {
    public static void main(String[] args) {
        Operate operate = new Operate();
        int all;
        double answer ;
        System.out.println("请你输入练习的题目数：");
        Scanner input = new Scanner(System.in);
        all = input.nextInt();
        for (int n = 0; n < all; n++) {
            int i = ( int) (Math.random() * 100);
            int j = ( int) (Math.random() * 100);
            int k = ( int) (Math.random() * 100);
            int l = ( int) (Math.random() * 100);
            switch (( int) (Math.random() * 4)) {
                case 1:
                    String str1 = "" + i + "+" + "" + j + "-" + "" + k + "/" + "" + l+"#";
                    answer = operate.caculate(str1);
                    System.out.println(str1 + "=" + answer);
                    break;
                case 2:
                    String str2 = "" + i + "+" + "" + j + "-" + "" + k + "/" + "" + l+"#";
                    answer = operate.caculate(str2);
                    System.out.println(str2 + "=" + answer);
                    break;
                case 3:
                    String str3 = "(" + "" + i + "+" + "" + j + ")" + "-" + "" + k + "/" + "" + l+"#";
                    answer = operate.caculate(str3);
                    System.out.println(str3 + "=" + answer);
                    break;
                case 4:
                    String str4 = "(" + "" + i + "+" + "" + j + "-" + "" + k + ")" + "*" + "" + l+"#1";
                    answer = operate.caculate(str4);
                    System.out.println(str4 + "=" + answer);
                    break;
            }
        }
    }
}

